﻿#include"shared_ptr.h"

struct Date
{
	int _year = 2025;
};

int main()
{
	myc::shared_ptr<Date> sp1(new Date);
	// ⽀持拷⻉
	myc::shared_ptr<Date> sp2(sp1);
	myc::shared_ptr<Date> sp3(sp2);
	cout << sp1.use_count() << endl;
	sp1->_year++;
	cout << sp1->_year << endl;
	cout << sp2->_year << endl;
	cout << sp3->_year << endl;
	return 0;
}
